generated: '2026-08-14' method: searched source: https://www.medplum.com/docs/cli name: medplum package: packages/medplum-packages.yml (@medplum/cli) prerequisites: Node.js 22+ install: - method: global command: npm install --global @medplum/cli - method: project dependency command: npm install @medplum/cli - method: ad-hoc (npx) command: npx medplum authentication: - method: stored credentials detail: 'medplum login opens a browser auth flow and writes ~/.medplum/credentials' - method: environment variables detail: 'MEDPLUM_CLIENT_ID / MEDPLUM_CLIENT_SECRET (dotenv-enabled via .env)' - method: command flags detail: '--client-id / --client-secret ' default_base_url: https://api.medplum.com self_hosted_override: 'MEDPLUM_BASE_URL environment variable, or --base-url / --fhir-url-path / --tokenUrl / --authorizeUrl flags' command_groups: - group: Auth commands: - name: login summary: Opens a browser to the Medplum auth page; writes credentials to ~/.medplum/credentials - name: whoami summary: Shows whether the client is authenticated and the current user/project - group: RESTful Operations commands: - name: get summary: 'HTTP GET; e.g. medplum get "Patient?name=homer"' flags: ['--as-transaction (convert response Bundle to a transaction bundle)'] - name: post summary: 'HTTP POST; e.g. medplum post Patient ''{"resourceType":"Patient",...}''' - name: put summary: 'HTTP PUT; e.g. medplum put Patient/$id ''{...}''' - name: patch summary: 'HTTP PATCH (JSONPatch body); e.g. medplum patch Patient/$id ''[{"op":"add",...}]''' - name: delete summary: 'HTTP DELETE; e.g. medplum delete Patient/$id' - group: Project commands: - name: project current summary: Shows the current project - name: project list summary: Lists project ids and names - name: project switch summary: Switches to another project - name: project invite summary: Invites a user to a project flags: ['--send-email', '--admin', '--role/-r '] - group: AWS stability: beta — likely to change requires: AWS authentication/access credentials configured commands: - name: aws list summary: Lists Medplum deployments (CloudFormation stacks tagged medplum:environment) - name: aws describe summary: Describes a deployment's AWS resources (ECS Cluster/Service, S3 buckets) - name: aws update-app summary: Updates the app S3 bucket to the latest version - name: aws update-server summary: Updates the ECS Service to the latest version - group: Bots config_file: medplum.config.json (bots[] array of {name, id, source, dist}) commands: - name: bot save summary: Updates the Bot resource's code property from the source file - name: bot deploy summary: Deploys the Bot's compiled code to the runtime - name: bot create summary: Creates a Bot resource and saves it - group: Bulk commands: - name: bulk export summary: Requests a bulk data export per the HL7 Bulk Data Access IG flags: - '-e/--export-level (system | Group/:id | Patient)' - '-t/--types ' - '-s/--since ' - '-d/--target-directory ' docs: https://build.fhir.org/ig/HL7/bulk-data/export.html - name: bulk import summary: Imports ndjson files generated by a bulk export flags: - '--num-resources-per-request (default 25)' - '-d/--target-directory ' key_flows: - Interactive login then ad-hoc FHIR CRUD via get/post/put/patch/delete - Bot development loop: write TypeScript in medplum.config.json's source path, `bot save`, compile with tsc, `bot deploy` - Bulk data export/import for population-health and migration workflows - AWS deployment management for self-hosted CDK deployments (beta)