{"id":18174557,"url":"https://github.com/superfaceai/cli","last_synced_at":"2025-04-01T15:31:50.476Z","repository":{"id":37101547,"uuid":"312256219","full_name":"superfaceai/cli","owner":"superfaceai","description":"Let AI connect the APIs for you","archived":true,"fork":false,"pushed_at":"2024-05-02T13:24:49.000Z","size":3714,"stargazers_count":23,"open_issues_count":13,"forks_count":4,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-04T08:21:41.729Z","etag":null,"topics":["api","cli","command-line-tool","developer-experience","developer-tools","development-tools","integration","javascript","rest","rest-api","typescript"],"latest_commit_sha":null,"homepage":"https://superface.ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superfaceai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-12T11:27:51.000Z","updated_at":"2024-10-04T18:24:18.000Z","dependencies_parsed_at":"2024-05-02T14:47:51.173Z","dependency_job_id":"48dd4740-c9da-47ef-b989-fe416a4b887c","html_url":"https://github.com/superfaceai/cli","commit_stats":{"total_commits":1121,"total_committers":15,"mean_commits":74.73333333333333,"dds":0.5468331846565566,"last_synced_commit":"5d459f65160834a169987540ade4089c7f75f747"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superfaceai%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superfaceai%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superfaceai%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superfaceai%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superfaceai","download_url":"https://codeload.github.com/superfaceai/cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246662381,"owners_count":20813738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","cli","command-line-tool","developer-experience","developer-tools","development-tools","integration","javascript","rest","rest-api","typescript"],"created_at":"2024-11-02T16:03:34.466Z","updated_at":"2025-04-01T15:31:47.844Z","avatar_url":"https://github.com/superfaceai.png","language":"TypeScript","readme":"[Website](https://superface.ai) | [Get Started](https://superface.ai/docs/introduction/getting-started) | [Documentation](https://superface.ai/docs) | [GitHub Discussions](https://sfc.is/discussions) | [Twitter](https://twitter.com/superfaceai) | [Support](https://superface.ai/support)\n\n\u003cimg src=\"https://github.com/superfaceai/cli/blob/main/docs/LogoGreen.png\" alt=\"Superface\" width=\"100\" height=\"100\"\u003e\n\n# Superface CLI [Deprecated]\n\n**_This project has now been deprecated and support for it is no longer offered. Although some of the APIs that it uses may still work, the CLI project will no longer be developed._**\n\n---\n\n**Let AI connect the APIs for you.**\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/superfaceai/cli/main.yml)](https://github.com/superfaceai/cli/actions/workflows/main.yml)\n[![Stable Release](https://img.shields.io/github/v/release/superfaceai/cli?label=homebrew)](#install)\n[![NPM](https://img.shields.io/npm/l/@superfaceai/cli)](LICENSE)\n![TypeScript](https://img.shields.io/badge/%3C%2F%3E-Typescript-blue)\n\nSuperface CLI abstracts APIs into the business cases you need. Point at API docs,\nstate your desired use case, let AI create an integration code, then use it\nin your application. You remain in control of the code, and your app communicates\ndirectly with your chosen APIs without any middlemen or proxy.\n\n## Install\n\n[Install Homebrew](https://brew.sh/), then install Superface CLI with:\n\n```shell\nbrew install superfaceai/cli/superface\n```\n\n## Usage\n\n  \u003c!-- commands --\u003e\n* [`superface execute PROVIDERNAME PROFILEID`](#superface-execute-providername-profileid)\n* [`superface login`](#superface-login)\n* [`superface logout`](#superface-logout)\n* [`superface map PROVIDERNAME [PROFILEID] [LANGUAGE]`](#superface-map-providername-profileid-language)\n* [`superface new PROVIDERNAME PROMPT [PROFILEID]`](#superface-new-providername-prompt-profileid)\n* [`superface prepare URLORPATH [NAME]`](#superface-prepare-urlorpath-name)\n* [`superface whoami`](#superface-whoami)\n\n## `superface execute PROVIDERNAME PROFILEID`\n\nRun the created integration in superface directory. Commands `prepare`, `new` and `map` must be run before this command. You can switch runner language via `language` flag (`js` by default).\n\n```\nUSAGE\n  $ superface execute PROVIDERNAME PROFILEID [LANGUAGE] [-q] [--noColor] [--noEmoji] [-h]\n\nARGUMENTS\n  PROVIDERNAME  Name of provider.\n  PROFILEID     Id of profile, eg: starwars.character-information\n\nFLAGS\n  -h, --help   show CLI help\n  -q, --quiet  When set to true, disables the shell echo output of action.\n  --noColor    When set to true, disables all colored output.\n  --noEmoji    When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Run the created integration in superface directory. Commands `prepare`, `new` and `map` must be run before this\n  command. You can switch runner language via `language` flag (`js` by default).\n\nEXAMPLES\n  $ superface execute resend communication/send-email\n```\n\n_See code: [dist/commands/execute.ts](https://github.com/superfaceai/cli/tree/main/src/commands/execute.ts)_\n\n## `superface login`\n\nLogin to superface server\n\n```\nUSAGE\n  $ superface login [-q] [--noColor] [--noEmoji] [-h] [-f]\n\nFLAGS\n  -f, --force  When set to true user won't be asked to confirm browser opening\n  -h, --help   show CLI help\n  -q, --quiet  When set to true, disables the shell echo output of action.\n  --noColor    When set to true, disables all colored output.\n  --noEmoji    When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Login to superface server\n\nEXAMPLES\n  $ superface login\n\n  $ superface login -f\n```\n\n_See code: [src/commands/login.ts](https://github.com/superfaceai/cli/tree/main/src/commands/login.ts)_\n\n## `superface logout`\n\nLogs out logged in user\n\n```\nUSAGE\n  $ superface logout [-q] [--noColor] [--noEmoji] [-h]\n\nFLAGS\n  -h, --help   show CLI help\n  -q, --quiet  When set to true, disables the shell echo output of action.\n  --noColor    When set to true, disables all colored output.\n  --noEmoji    When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Logs out logged in user\n\nEXAMPLES\n  $ superface logout\n```\n\n_See code: [dist/commands/logout.ts](https://github.com/superfaceai/cli/tree/main/src/commands/logout.ts)_\n\n## `superface map PROVIDERNAME [PROFILEID] [LANGUAGE]`\n\nCreates a new (or updates an existing) Comlink Map that maps the use case to the selected API provider. After Map is available, the integration is ready to be used by our WASM OneSDK. You should check security, integration parameters and input in the created files before execution. The created Comlinks can be tested by running `superface execute` command\n\n```\nUSAGE\n  $ superface map PROVIDERNAME [PROFILEID] [LANGUAGE] [-q] [--noColor] [--noEmoji] [-h] [-t \u003cvalue\u003e]\n\nARGUMENTS\n  PROVIDERNAME  Name of provider.\n  PROFILEID     Id of profile, eg: starwars/character-information\n  LANGUAGE      (python|js) [default: js] Language of the generated application code. Default is `js`\n\nFLAGS\n  -h, --help             show CLI help\n  -q, --quiet            When set to true, disables the shell echo output of action.\n  -t, --timeout=\u003cvalue\u003e  [default: 300] Operation timeout in seconds. If not provided, it will be set to 300 seconds.\n                         Useful for large API documentations.\n  --noColor              When set to true, disables all colored output.\n  --noEmoji              When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Creates a new (or updates an existing) Comlink Map that maps the use case to the selected API provider. After Map is\n  available, the integration is ready to be used by our WASM OneSDK. You should check security, integration parameters\n  and input in the created files before execution. The created Comlinks can be tested by running `superface execute`\n  command\n\nEXAMPLES\n  $ superface map resend communication/send-email\n```\n\n_See code: [dist/commands/map.ts](https://github.com/superfaceai/cli/tree/main/src/commands/map.ts)_\n\n## `superface new PROVIDERNAME PROMPT [PROFILEID]`\n\nCreates new Comlink Profile for your use case based on the selected API. Comlink Profile defines the interface of the API integration. Use name of API provider as the first argument followed by the description of your use case. You need to run `superface prepare` command before running this command.\n\n```\nUSAGE\n  $ superface new PROVIDERNAME PROMPT [PROFILEID] [-q] [--noColor] [--noEmoji] [-h] [-t \u003cvalue\u003e]\n\nARGUMENTS\n  PROVIDERNAME  URL or path to the API documentation.\n  PROMPT        Short description of your use case in natural language.\n  PROFILEID     Optional ID of the new profile, e.g. starwars/character-information. If not provided, profile ID will be\n                inferred from the prompt.\n\nFLAGS\n  -h, --help             show CLI help\n  -q, --quiet            When set to true, disables the shell echo output of action.\n  -t, --timeout=\u003cvalue\u003e  [default: 300] Operation timeout in seconds. If not provided, it will be set to 300 seconds.\n                         Useful for large API documentations.\n  --noColor              When set to true, disables all colored output.\n  --noEmoji              When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Creates new Comlink Profile for your use case based on the selected API. Comlink Profile defines the interface of the\n  API integration. Use name of API provider as the first argument followed by the description of your use case. You need\n  to run `superface prepare` command before running this command.\n\nEXAMPLES\n  $ superface new swapi \"retrieve character's homeworld by their name\"\n\n  $ superface new swapi \"retrieve character's homeworld by their name\" swapi/character-information\n\n  $ superface new resend \"Send email to user\"\n```\n\n_See code: [dist/commands/new.ts](https://github.com/superfaceai/cli/tree/main/src/commands/new.ts)_\n\n## `superface prepare URLORPATH [NAME]`\n\nLearns API from the documentation and prepares the API metadata.\n\n```\nUSAGE\n  $ superface prepare URLORPATH [NAME] [-q] [--noColor] [--noEmoji] [-h] [-v] [-t \u003cvalue\u003e]\n\nARGUMENTS\n  URLORPATH  URL or path to the API documentation.\n  NAME       API name. If not provided, it will be inferred from URL or file name.\n\nFLAGS\n  -h, --help             show CLI help\n  -q, --quiet            When set to true, disables the shell echo output of action.\n  -t, --timeout=\u003cvalue\u003e  [default: 300] Operation timeout in seconds. If not provided, it will be set to 300 seconds.\n                         Useful for large API documentations.\n  -v, --verbose          When set to true command will print the indexed documentation overview. This is useful for\n                         debugging.\n  --noColor              When set to true, disables all colored output.\n  --noEmoji              When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Learns API from the documentation and prepares the API metadata.\n\n  The supported documentation formats are:\n  - OpenAPI specification (via URL or local file)\n  - documentation hosted on ReadMe.io (via URL)\n  - plain text (see below)\n\n  If you want to use plain text documentation you need to format the docs with **the separator**. The documentation\n  conventionally consists of various topics, usually set apart by separate pages or big headings. They might be\n  _authentication, rate limiting, general rules, API operations (sometimes grouped by resources)_.\n\n  It's highly recommended each of these topics (or chunks) is set apart in the docs provided for Superface, too. For\n  that, we use _the separator_.\n\n  The separator is a long `===========` ended with a newline. Technically 5 _equal_ characters are enough to form a\n  separator. The API docs ready for the ingest might look something like the following:\n\n  `\n  # Welcome to our docs\n  (...)\n  ================================\n  # API Basics\n  (...)\n  ================================\n  # Authorizing Requests\n  (...)\n  ================================\n  # /todos/:id/items\n  This endpoint lists all items (...)\n  ================================\n  (...)\n  `\n  This command prepares a Provider JSON metadata definition that can be used to generate the integration code. Superface\n  tries to fill as much as possibe from the API documentation, but some parts are required to be filled manually. You\n  can find the prepared provider definition in the `superface/` directory in the current working directory.\n\nEXAMPLES\n  $ superface prepare https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/openai.com/1.2.0/openapi.yaml\n\n  $ superface prepare https://raw.githubusercontent.com/APIs-guru/openapi-directory/main/APIs/openai.com/1.2.0/openapi.yaml openai\n\n  $ superface prepare path/to/openapi.json\n\n  $ superface prepare https://workable.readme.io/reference/stages workable\n\n  $ superface prepare https://workable.readme.io/reference/stages workable --verbose\n```\n\n_See code: [dist/commands/prepare.ts](https://github.com/superfaceai/cli/tree/main/src/commands/prepare.ts)_\n\n## `superface whoami`\n\nPrints info about logged in user\n\n```\nUSAGE\n  $ superface whoami [-q] [--noColor] [--noEmoji] [-h]\n\nFLAGS\n  -h, --help   show CLI help\n  -q, --quiet  When set to true, disables the shell echo output of action.\n  --noColor    When set to true, disables all colored output.\n  --noEmoji    When set to true, disables displaying emoji in output.\n\nDESCRIPTION\n  Prints info about logged in user\n\nEXAMPLES\n  $ superface whoami\n\n  $ sf whoami\n```\n\n_See code: [src/commands/whoami.ts](https://github.com/superfaceai/cli/tree/main/src/commands/whoami.ts)_\n\n\u003c!-- commandsstop --\u003e\n\n## Development\n\nWhen developing, start with cloning the repository using `git clone https://github.com/superfaceai/cli.git` (or `git clone git@github.com:superfaceai/cli.git` if you have repository access).\n\nAfter cloning, the dependencies must be downloaded using `yarn install` or `npm install`.\n\nNow the repository is ready for code changes.\n\nThe `package.json` also contains scripts (runnable by calling `yarn \u003cscript-name\u003e` or `npm run \u003cscript-name\u003e`):\n\n- `test` - run all tests\n- `lint` - lint the code (use `lint --fix` to run autofix)\n- `format` - check the code formatting (use `firmat:fix` to autoformat)\n- `prepush` - run `test`, `lint` and `format` checks. This should run without errors before you push anything to git.\n\nLastly, to build a local artifact run `yarn build` or `npm run build`.\n\nTo install a local artifact globally, symlink the binary (`ln -s bin/superface \u003ctarget\u003e`) into one of the following folders:\n\n- `~/.local/bin` - local binaries for your user only (may not be in `PATH` yet)\n- `/usr/local/bin` - system-wide binaries installed by the system administrator\n- output of `yarn global bin` - usually the same as `/use/local/bin`\n\n**Note**: The project needs to be built (into the `dist` folder) to run cli commands.\n\n**Note**: You can change url of API requests by setting `SUPERFACE_API_URL` environment variable to desired base url.\n\n## Contributing\n\n**Please open an issue first if you want to make larger changes**\n\nFeel free to contribute! Please follow the [Contribution Guide](CONTRIBUTING.md).\n\nLicenses of node_modules are checked during CI/CD for every commit. Only the following licenses are allowed:\n\n- 0BDS\n- MIT\n- Apache-2.0\n- ISC\n- BSD-3-Clause\n- BSD-2-Clause\n- CC-BY-4.0\n- CC-BY-3.0;BSD\n- CC0-1.0\n- Unlicense\n\nNote: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\nThe Superface CLI is licensed under the [MIT](LICENSE).\n\n© 2023 Superface\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperfaceai%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperfaceai%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperfaceai%2Fcli/lists"}