skipcheck

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.

  • A TM1 server, and a user on it. Its REST API must be on: HTTPPortNumber in its tm1s.cfg. To follow along with IBM's SData sample, run Planning Analytics on your own computer: it answers at http://localhost:8011, and you log in as admin with the password apple.
  • git on your computer. tm1cm needs Python too: installing it with uv gets one for you.

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 --help

PowerShell

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv tool install --python 3.14 tm1cm
uv tool update-shell
tm1cm --help

uv 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 --help

PowerShell

py -3.14 -m venv $HOME\.venvs\tm1cm
& $HOME\.venvs\tm1cm\Scripts\python -m pip install tm1cm
& $HOME\.venvs\tm1cm\Scripts\tm1cm --help

On 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.

  1. Check tm1cm is installed (Install, above): tm1cm --help lists its options.
  2. Make a project. It's a folder; the name is yours. Here it's sales:

    Terminal

    tm1cm --mode scaffold --path sales

    Output

    … 8 lines before
    2026-01-01 09:00:00,000 - tm1cm.scaffold - create_scaffold(94) - INFO - created new scaffold at sales

    Terminal

    cd sales

    It has a config folder: default holds what every environment shares, and test and prod are environments. Rename them, or add others, as your servers are: one folder per server.

    Terminal

    find . -type f | sort

    Output

    ./.gitignore
    ./config/default/connect.yaml
    ./config/default/credentials.yaml
    ./config/default/tm1cm.yaml
    ./config/prod/connect.yaml
    ./config/test/connect.yaml

    PowerShell

    Get-ChildItem -Recurse -File -Name

    Output, as on macOS

    ./.gitignore
    ./config/default/connect.yaml
    ./config/default/credentials.yaml
    ./config/default/tm1cm.yaml
    ./config/prod/connect.yaml
    ./config/test/connect.yaml
  3. Say where the server is, in its environment's connect.yaml. base_url is the server's address, without /api/v1 (tm1cm adds that):

    config/test/connect.yaml

    base_url: http://localhost:8011

    A server with a certificate your computer doesn't trust needs verify too; the connection settings have it, and the other ways to name a server.

  4. 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: apple

    SData'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 .gitignore keeps credentials.yaml out of git either way. A server in CAM security needs namespace too, or tm1cm lists the namespaces to pick from: Log in to TM1.

  5. Get the model. tm1cm logs in, reads every object tm1cm.yaml includes, and writes it:

    Terminal

    tm1cm --mode get --environment test

    Output

    … 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/
  6. Look at what it wrote. A folder for each type of object:

    Terminal

    ls data

    Output

    cube
    dimension
    hierarchy
    process
    rule
    view

    PowerShell

    Get-ChildItem data -Name

    Output, as on macOS

    cube
    dimension
    hierarchy
    process
    rule
    view

    and a file for each object, named after it:

    Terminal

    ls data/process

    Output

    }Drill_CUBE_SalesByQuarter.process
    }Drill_RELATIONALTABLE_SalesAllModel.process
    create_Y2Ksales_cube.process

    PowerShell

    Get-ChildItem data/process -Name

    Output, as on macOS

    }Drill_CUBE_SalesByQuarter.process
    }Drill_RELATIONALTABLE_SalesAllModel.process
    create_Y2Ksales_cube.process

    A 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

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.

  • 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.