tm1cm · Walkthrough 1 of 5
Set up a project and get your model
You make a tm1cm project, tell it where your TM1 server is, and get its model: a file for each process, cube, rule, dimension, hierarchy and view. Each step shows what tm1cm printed when we ran it against IBM's SData sample.
Before you start
- A TM1 server, and a user on it. Its REST API must be on:
HTTPPortNumberin itstm1s.cfg. To follow along with IBM's SData sample, run Planning Analytics on your own computer: it answers athttp://localhost:8011, and you log in asadminwith the passwordapple. - git on your computer. tm1cm needs Python too: installing it with uv gets one for you.
Install
The easiest way is uv: one command installs it, and it downloads the Python tm1cm needs and gives tm1cm an environment of its own, apart from your computer's Python. Then the tm1cm command works in any terminal.
Terminal
curl -LsSf https://astral.sh/uv/install.sh | sh
uv tool install --python 3.14 tm1cm
uv tool update-shell
tm1cm --helpPowerShell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv tool install --python 3.14 tm1cm
uv tool update-shell
tm1cm --helpuv tool update-shell puts uv's tools on your PATH: open a new terminal after it. Later, uv tool upgrade tm1cm updates tm1cm. This installs the latest release, 1.1.0. Rather use a Python you have? Install it in a virtual environment.
Or in a virtual environment.
With a Python 3.11 or newer of your own (from python.org, say), make a virtual environment for tm1cm, so it doesn't touch your system's Python or its packages, and install it there:
Terminal
python3 -m venv ~/.venvs/tm1cm
source ~/.venvs/tm1cm/bin/activate
python -m pip install tm1cm
tm1cm --helpPowerShell
py -3.14 -m venv $HOME\.venvs\tm1cm
& $HOME\.venvs\tm1cm\Scripts\python -m pip install tm1cm
& $HOME\.venvs\tm1cm\Scripts\tm1cm --helpOn macOS and Linux, activate the environment in each new terminal before you run tm1cm (the second line). On Windows, run it by its path, $HOME\.venvs\tm1cm\Scripts\tm1cm, or add $HOME\.venvs\tm1cm\Scripts to your PATH. py is the launcher python.org's installer puts on Windows.
Steps
- Check tm1cm is installed (Install, above):
tm1cm --helplists its options. Make a project. It's a folder; the name is yours. Here it's
sales:Terminal
tm1cm --mode scaffold --path salesOutput
… 8 lines before 2026-01-01 09:00:00,000 - tm1cm.scaffold - create_scaffold(94) - INFO - created new scaffold at salesTerminal
cd salesIt has a
configfolder:defaultholds what every environment shares, andtestandprodare environments. Rename them, or add others, as your servers are: one folder per server.Terminal
find . -type f | sortOutput
./.gitignore ./config/default/connect.yaml ./config/default/credentials.yaml ./config/default/tm1cm.yaml ./config/prod/connect.yaml ./config/test/connect.yamlPowerShell
Get-ChildItem -Recurse -File -NameOutput, as on macOS
./.gitignore ./config/default/connect.yaml ./config/default/credentials.yaml ./config/default/tm1cm.yaml ./config/prod/connect.yaml ./config/test/connect.yamlSay where the server is, in its environment's
connect.yaml.base_urlis the server's address, without/api/v1(tm1cm adds that):config/test/connect.yaml
base_url: http://localhost:8011A server with a certificate your computer doesn't trust needs
verifytoo; the connection settings have it, and the other ways to name a server.Say who logs in, in
config/default/credentials.yaml, for every environment, or in an environment's own folder:config/default/credentials.yaml
user: admin password: appleSData's password is public, so it's in the file here. For your own server, leave it out, and tm1cm asks for it each time it connects, so it's never in a file. The scaffold's
.gitignorekeepscredentials.yamlout of git either way. A server in CAM security needsnamespacetoo, or tm1cm lists the namespaces to pick from: Log in to TM1.Get the model. tm1cm logs in, reads every object
tm1cm.yamlincludes, and writes it:Terminal
tm1cm --mode get --environment testOutput
… 148 lines before 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }ElementAttributes_}MS_SalesCube_metrics}_World Sales Strategy:All 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MD_SalesCube_metrics}_World Sales:All 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MD_SalesCube_metrics}_World Sales:MD_SalesCube_metrics}_World Sales 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MI_SalesCube_metrics:All 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MI_SalesCube_metrics:MI_SalesCube_metrics 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MS_SalesCube_metrics}_World Sales Strategy:All 2026-01-01 09:00:00,000 - main - main(75) - INFO - Performing operation UPDATE_VIEW: }MS_SalesCube_metrics}_World Sales Strategy:MS_SalesCube_metrics}_World Sales Strategy 2026-01-01 09:00:00,000 - skipcheck_tm1 - close(400) - INFO - Closed TM1 session 3 at http://localhost:8011/api/v1/Look at what it wrote. A folder for each type of object:
Terminal
ls dataOutput
cube dimension hierarchy process rule viewPowerShell
Get-ChildItem data -NameOutput, as on macOS
cube dimension hierarchy process rule viewand a file for each object, named after it:
Terminal
ls data/processOutput
}Drill_CUBE_SalesByQuarter.process }Drill_RELATIONALTABLE_SalesAllModel.process create_Y2Ksales_cube.processPowerShell
Get-ChildItem data/process -NameOutput, as on macOS
}Drill_CUBE_SalesByQuarter.process }Drill_RELATIONALTABLE_SalesAllModel.process create_Y2Ksales_cube.processA process's file holds its settings, then each of its procedures, formatted the same way every time, so a change shows as just that:
data/process/create_Y2Ksales_cube.process
############################################################################### # BEGIN: PROPERTIES ########################################################### ############################################################################### DataSource: Type: ASCII asciiDecimalSeparator: . asciiDelimiterChar: ',' asciiDelimiterType: Character asciiHeaderRecords: 0 asciiQuoteCharacter: '"' asciiThousandSeparator: ',' dataSourceNameForClient: C:\Program Files\Applix\Integra\Custom\TM1Data\SData\y2ksales.cma dataSourceNameForServer: C:\Program Files\Applix\Integra\Custom\TM1Data\SData\y2ksales.cma HasSecurityAccess: false Parameters: [] UIData: "CubeAction=1576\fDataAction=1503\fCubeName=Y2Ksales\fCubeLogChanges=0\fMeasuresDimOrder=5\f" Variables: - EndByte: 0 Name: V2 StartByte: 0 Type: String - EndByte: 0 Name: V3 StartByte: 0 … 88 more lines
What's next
Keep the project in git, and promote a change from one server to another. To leave some objects out (control cubes, temporary processes, the elements another system maintains), change the filters in config/default/tm1cm.yaml: every filter.
Next
- Log in to TM1: Keep passwords out of files, sign in to CAM and through a browser, and give settings on the command line.
All the settings, filters, options and exit codes are in the reference.