However if you need something straightforward and concise, look at this implementation below of a few fundamental objects in differential geometry. You need a metric g and a coordinate system xx on a mapan open set of a 4-dimentional (riemannian or lorentzian) manifold (but it is a straightforward to define these objects for other dimentions) as an input, eg.
The above is a Lorentzian metric tensor (in a given map) of a static spherically symmetric four dimentional manifold, and the following are the inverse metric, Christoffel symbol of the second kind, Riemann and Ricci curvature tensors and the Ricci scalar with brief descriptions of their usage:

InverseMetric[ g_, xx_] := Block[{ res }, res = Simplify[ Inverse[g] ]; res ]

ChristoffelSymbol[g_, xx_] := Block[{n, ig, res}, n = 4; ig = InverseMetric[ g, xx]; res = Table[(1/2)*Sum[ ig[[i,s]]*(-D[ g[[j,k]], xx[[s]]] + D[ g[[j,s]], xx[[k]]] + D[ g[[s,k]], xx[[j]]]), {s, 1, n}], {i, 1, n}, {j, 1, n}, {k, 1, n}]; res ]

RiemannTensor[g_, xx_] := Block[{n, Chr, res}, n = 4; Chr = ChristoffelSymbol[ g, xx]; res = Table[ D[ Chr[[i,k,m]], xx[[l]]] - D[ Chr[[i,k,l]], xx[[m]]] + Sum[ Chr[[i,s,l]]*Chr[[s,k,m]], {s, 1, n}] - Sum[ Chr[[i,s,m]]*Chr[[s,k,l]], {s, 1, n}], {i, 1, n}, {k, 1, n}, {l, 1, n}, {m, 1, n}]; res ]

RicciTensor[g_, xx_] := Block[{Rie, res, n}, n = 4; Rie = RiemannTensor[ g, xx]; res = Table[ Sum[ Rie[[ s,i,s,j]], {s, 1, n}], {i, 1, n}, {j, 1, n}]; res ]

RicciScalar[g_, xx_] := Block[{Ricc,ig, res, n}, n = 4; Ricc = RicciTensor[ g, xx]; ig = InverseMetric[ g, xx]; res = Sum[ ig[[s,i]] Ricc[[s,i]], {s, 1, n}, {i, 1, n}]; Simplify[res] ]
This is not an optimal implementation, but it is a good point to start building your own package. You could think about introducing a functional definition of the covariant derivative as well as lower and upper indices of covariant and contravariant tensors. One of the common difficulties with this is the multiplicity of definitions and conventions for Riemann and Ricci tensors etc, and that's why I added descriptions of the given functions.