Run OpenSees in the Cloud
from any device
A command line for OpenSeesCloud — call ops from Python, JavaScript, C++, shells, CI, or any tool that can invoke a CLI. Authenticate, submit simulations, stream output, and manage cloud files on macOS, Linux, and Windows.
Submit & wait
Upload a .py model into a cloud folder, set timeout and RAM, and wait for the result or come back later.
Cloud files
Keep every file in a folder. A script can import the other Python files in that folder. Link Dropbox to store the library there.
Pin OpenSeesPy
Choose an active registry version with ops version set; sticky pin travels with every submit.
$ pip install opensees_cli $ ops auth login -e you@example.com $ ops run submit ./model.py --folder lab -t 2m --ram 1G --wait → uploading model.py to lab/model.py → analysis abc123… running
Install
Install from PyPI. The distribution and import name are both opensees_cli.
Install the package
Requires Python 3.9 or newer.
pip install opensees_cli
Make sure ops is on your PATH
If a new terminal cannot find ops, add the pip scripts directory:
python -m opensees_cli set-path
Open a new terminal afterward. You can always run via python -m opensees_cli.
Verify
ops version ops help
opensees-cli resolves to the same project).
Quick start
Create an account, confirm email, log in, then submit a model.
# 1) Create account ops auth signup --email you@example.com # 2) Confirm with the code from your inbox ops auth confirm --email you@example.com --code 123456 # 3) Log in ops auth login --email you@example.com # 4) Upload into a folder, then run ops run submit ./model.py --folder lab --timeout 5m --ram 1G --wait
Auth
Manage signup, login, and passwords under ops auth.
ops auth signup -e you@example.com ops auth confirm -e you@example.com -c 123456 ops auth resend-code -e you@example.com ops auth login -e you@example.com ops auth logout ops auth status ops auth forgot-password -e you@example.com ops auth reset-password -e you@example.com -c 123456 ops auth change-password
forgot-password, then reset-password with the emailed code.
Use change-password when already logged in.
Run
Submit analyses, follow progress, inspect stdout and artifacts.
Submit
A local .py file must include --folder. It is uploaded there, then the run uses that cloud path. A path that is not on disk is an existing cloud file, and it must already sit in a folder (lab/model.py).
- -f, --folderCloud folder for a local file. Required. Example:
ops run submit model.py --folder lab. - -t, --timeoutMax runtime per task. A number is seconds. Also
30m,2h,1d,1w(default 120 seconds). Capped by your per-task quota. Monthly runtime must covertimeout × count. Above 15 minutes the run uses the long worker. - -r, --ramRAM for this run:
1G,512M, or a number of megabytes (default 1G). Capped by your account maximum. - -n, --countNumber of parallel tasks (default 1).
- -w, --waitWait until completion. Without
--wait, the analysis ID is the only line on stdout. - -p, --paramRepeatable
key=value. In the script:from openseespy.cli_params import cli_params. - --params-fileJSON object of parameters.
import helper in lab/model.py loads lab/helper.py. Put those files in the folder before you submit.
Monitor & results
ops run follow <analysis_id> ops run status <analysis_id> [range] ops run output <analysis_id> [range] ops run stats <analysis_id> [range] ops run data <analysis_id> [range] -d . -o ./out ops run cancel <analysis_id> ops run list -n 20 ops run clear <analysis_id> -y
ops run follow tracks progress until every task finishes. Read the printed log with ops run output.
Optional range is a task index, start-end, or all.
ops run list supports --week, --month, --year, --after, --before, --all, and --json.
ops run clear can take an analysis ID, or --before / --after dates.
Cloud files
Your library for inputs you reuse. Every file must land inside a folder. Uploads are limited to 100 MB per file.
ops files list # all files ops files list truss # one folder ops files list --json ops files upload ./model.py -f lab ops files upload ./project -f lab # a whole folder ops files download lab/model.py -o ./local.py ops files download 'lab/*.py' -o ./out ops files delete lab/model.py ops files delete lab
ops run submit lab/model.py. Quote globs so the shell does not expand them:
ops files download '*.csv'.
Dropbox
Link Dropbox and the library is stored in Apps/OpenSeesCloud. New files and run results go there while it is linked. ops status shows Dropbox space and how much of it this folder uses.
ops files dropbox link # browser login, then copy the library ops files dropbox status ops files dropbox copy # copy the cloud library again ops files dropbox unlink # files already in Dropbox stay there
OpenSeesPy version
Pin a sticky local preference, or use the API default (latest active registry version).
ops version # effective version (pinned or default) ops version list # registry; --status active ops version set 3.7.0.0 # pin; travels with every submit ops version clear # drop the pin; use the API default
Status & quota
See who you are, the OpenSeesPy pin, and remaining quota. Add --json for one JSON object.
ops status ops status --json
- Account lines include email, org, and whether this account is the org primary.
- Quota includes concurrent tasks, max timeout, max RAM, monthly runtime, and storage.
- When members share a primary’s quota, status shows who shares it, your own storage, and the combined total.
- A linked Dropbox account adds Dropbox space and the size of
Apps/OpenSeesCloud.
Example: Truss.py
A classic 2D truss from a local file at examples/Truss.py — upload, submit, check when it finishes, read stdout, inspect artifacts, and download results.
getTaskID() demo
One script, many tasks. ops.getTaskID() is 0, 1, 2, … for each parallel worker. This example has two customizations:
- Young’s modulus:
E = 3000 × (task_id + 1)— task 0 → 3000, task 1 → 6000, task 2 → 9000. - Divide the reference
ux,uyby(task_id + 1)so expected displacements match thatE.
Submit with -n 3 and you get three different E values from the same Truss.py. That is the lesson: use task ID to customize the script (material, load case, mesh seed, …) without shipping a new file per run.
The model
Local folder: examples/Truss.py
print("==========================") print("Starting Truss example") import openseespy.opensees as ops from openseespy.cli_params import cli_params # ------------------------------ # Start of model generation # ----------------------------- task_id = ops.getTaskID() num_tasks = ops.getNTasks() print(f"Task ID: {task_id}, Number of tasks: {num_tasks}, cli_params: {cli_params}") # remove existing model ops.wipe() # set modelbuilder ops.model('basic', '-ndm', 2, '-ndf', 2) # create nodes ops.node(1, 0.0, 0.0) ops.node(2, 144.0, 0.0) ops.node(3, 168.0, 0.0) ops.node(4, 72.0, 96.0) # set boundary condition ops.fix(1, 1, 1) ops.fix(2, 1, 1) ops.fix(3, 1, 1) # define materials # DEMO: different E per task (task 0 → 3000, task 1 → 6000, …) # E = 3000 * (task_id + 1) # getTaskID() is how one script customizes itself per parallel worker. ops.uniaxialMaterial("Elastic", 1, 3000.0 * (task_id+1)) # define elements ops.element("Truss",1,1,4,10.0,1) ops.element("Truss",2,2,4,5.0,1) ops.element("Truss",3,3,4,5.0,1) # create TimeSeries ops.timeSeries("Linear", 1) # create a plain load pattern ops.pattern("Plain", 1, 1) # Create the nodal load - command: load nodeID xForce yForce ops.load(4, 100.0, -50.0) # ------------------------------ # Start of analysis generation # ------------------------------ # create SOE ops.system("Mumps") # create DOF number ops.numberer("Plain") # create constraint handler ops.constraints("Plain") # create integrator ops.integrator("LoadControl", 1.0) # create algorithm ops.algorithm("Linear") # create analysis object ops.analysis("Static") # perform the analysis ops.analyze(1, '-noFlush') ux = ops.nodeDisp(4,1) uy = ops.nodeDisp(4,2) # DEMO: divide the reference ux, uy by (task_id + 1) (disp ~ 1/E) ux_expected = 0.53009277713228375450 / (task_id+1) uy_expected = 0.17789363846931768864 / (task_id+1) print(f"Task {task_id}: ux = {ux}, uy = {uy}, expected = {ux_expected}, {-uy_expected}") print("==========================") # save to file fd = open('truss.txt', 'w') fd.write(f'Task {task_id}: ux = {ux}, uy = {uy}, expected = {ux_expected}, {-uy_expected}') fd.close()
Upload the model
Upload the local file examples/Truss.py to your cloud file system.
ops files upload examples/Truss.py -f truss # upload local to cloud folder truss ops files list truss # confirm Truss.py is listed
Tip: ops run submit ./examples/Truss.py --folder truss uploads and submits in one step.
Submit the run
Submit the cloud file uploaded in step 1. Use -n 3 to run three tasks and see three different E values from this one script. Without --wait, the analysis ID is printed on stdout.
ops run submit truss/Truss.py -t 60 -n 3 --wait # 3 tasks → E = 3000, 6000, 9000 # single task (E = 3000), no wait: ops run submit truss/Truss.py -t 60
Check status
Poll until the analysis is completed or failed (skip if you used --wait).
ops run status <analysis_id> # or follow until every task finishes: ops run follow <analysis_id>
Show output
Print the simulation stdout (what the script printed in the Cloud).
ops run output <analysis_id>
Expected stdout for a successful run:
Running Truss.py...
==========================
Starting Truss example
Task ID: 0, Number of tasks: 1, cli_params: {}
Task 0: ux = 0.5300927771322838, uy = -0.1778936384693177, expected = 0.5300927771322838, -0.1778936384693177
==========================
Process 0 Terminating
List data files
See result JSON, OSB model snapshots, truss.txt (written by the script), and other artifacts from the run.
ops run data <analysis_id> # return data for the run ops run stats <analysis_id> # return code, runtime, RAM
Download artifacts
Download truss.txt (written by the script) from the run artifacts to your local machine.
ops run data <analysis_id> -d artifacts/truss.txt -o ~/Downloads/ # download truss.txt that was generated in the script to local ~/Downloads folder
ops files upload examples/Truss.py -f truss # upload local to cloud folder truss ops run submit truss/Truss.py -t 60 -n 3 --wait # 3 tasks → three E values from getTaskID() # save analysis_id from submit output if not using --wait: ops run status <analysis_id> ops run output <analysis_id> ops run data <analysis_id> # return data for the run ops run data <analysis_id> -d artifacts/truss.txt -o ~/Downloads/ # download truss.txt that was generated in the script to local ~/Downloads folder
Command reference
Top-level entry points. Use ops <cmd> --help for the full option list.
Show CLI help.
Add the ops scripts directory to your PATH. Prefer python -m opensees_cli set-path if ops is not found yet. -y applies without prompting.
Show the effective OpenSeesPy version, or set, get, list, and clear the sticky pin. The pin is sent with every submit.
Account, org, OpenSeesPy pin, runtime, RAM, storage, shared quota, and Dropbox when linked. --json prints one object.
signup · confirm · resend-code · login · logout · status · forgot-password · reset-password · change-password
submit · follow · status · output · stats · data · cancel · clear · list. A local submit needs --folder. Timeout accepts 30m and 2h. RAM is --ram 1G.
list · upload · download · delete · dropbox (link, status, copy, unlink). Upload a file or a folder. Quote globs on download and delete.
PATH and the ops command
Pip installs the launcher into a scripts directory that may not be on PATH.
- On first interactive run, the CLI can offer to fix PATH automatically.
- Force the step anytime:
python -m opensees_cli set-path(answer Y). - Equivalent entry point:
python -m opensees_cli. - To see the offer again after skipping, delete
~/.opensees/path_fixed(Windows:%USERPROFILE%\.opensees\path_fixed).