{"id":20198217,"url":"https://github.com/zws-im/cli","last_synced_at":"2025-04-10T10:46:00.341Z","repository":{"id":39866426,"uuid":"341995134","full_name":"zws-im/cli","owner":"zws-im","description":"A command line interface for ZWS instances","archived":false,"fork":false,"pushed_at":"2024-10-26T01:47:30.000Z","size":13358,"stargazers_count":9,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-29T18:47:45.096Z","etag":null,"topics":["32-bit","64-bit","cli","docker","linux","nim","url-shortener","windows","zws"],"latest_commit_sha":null,"homepage":"","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zws-im.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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},"funding":{"github":["jonahsnider"],"patreon":"jonahsnider","open_collective":"zws","ko_fi":"jonahsnider","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2021-02-24T18:24:19.000Z","updated_at":"2024-10-26T01:47:23.000Z","dependencies_parsed_at":"2023-09-27T21:49:01.053Z","dependency_job_id":"566b84d9-6ffd-4752-8578-0003726ea67c","html_url":"https://github.com/zws-im/cli","commit_stats":{"total_commits":216,"total_committers":4,"mean_commits":54.0,"dds":"0.24537037037037035","last_synced_commit":"6360809c5a426fb3c4c66bde8d5dfe7840d830dc"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zws-im%2Fcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zws-im%2Fcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zws-im%2Fcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zws-im%2Fcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zws-im","download_url":"https://codeload.github.com/zws-im/cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248201301,"owners_count":21064091,"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":["32-bit","64-bit","cli","docker","linux","nim","url-shortener","windows","zws"],"created_at":"2024-11-14T04:29:57.534Z","updated_at":"2025-04-10T10:46:00.322Z","avatar_url":"https://github.com/zws-im.png","language":"Nim","funding_links":["https://github.com/sponsors/jonahsnider","https://patreon.com/jonahsnider","https://opencollective.com/zws","https://ko-fi.com/jonahsnider"],"categories":[],"sub_categories":[],"readme":"# zws-im/cli\n\nA command line interface for [ZWS][zws] instances.\n\n## Usage\n\n```sh\nzws [options] [url]\nzws [options] shorten [url]\nzws [options] stats [url]\nzws [options] config\n```\n\n| Flags             | Description                   |\n| ----------------- | ----------------------------- |\n| `-h`, `--help`    | Print help and exit.          |\n| `-v`, `--version` | Print version and exit.       |\n| `--json`          | Output JSON.                  |\n| `--plain`         | Output without formatting.    |\n| `--no-input`      | Disable reading from `stdin`. |\n\n## Subcommands\n\n### `shorten` (default)\n\nShortens the provided URL.\n\n```sh\nzws [options] [url]\nzws [options] shorten [url]\n```\n\nIf no URL is provided and `--no-input` is not provided and the terminal is not a TTY it will be read from `stdin`.\n\n### `stats`\n\nView total statistics for the configured ZWS instance.\n\n```sh\nzws [options] stats\n```\n\n### `stats \u003curl\u003e`\n\nView usage statistics for a shortened URL.\n\n```sh\nzws [options] stats \u003curl\u003e\n```\n\n### `config`\n\nPrint the current configuration.\nYou can view the config path and if it's being loaded with the `-h` or `--help` flag.\n\n```sh\nzws [options] config\n```\n\n## Config\n\nThe config is stored as `zws.ini` in [the config directory of the current user for applications](https://nim-lang.org/docs/os.html#getConfigDir) as [the Nim configuration file format](https://nim-lang.org/docs/parsecfg.html).\n\n### Full example\n\n```ini\n[Api]\nurl = \"https://api.example.com\"\ntoken = \"YTdaKVdfGPxdkKaayRwaVHvLXtVkPdPz\"\n\n[Shortened]\nbaseUrl = \"https://example.com\"\n```\n\n### `Api`\n\n| Key     | Description                                                                                          | Default              |\n| ------- | ---------------------------------------------------------------------------------------------------- | -------------------- |\n| `url`   | The URL of the [ZWS instance][zws].                                                                  | `https://api.zws.im` |\n| `token` | The API token to use in requests. Only required for custom instances with authentication configured. |                      |\n\n### `Shortened`\n\n| Key                  | Description                                                                                                           | Default                                                                           |\n| -------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |\n| DEPRECATED `baseUrl` | The URL shortened IDs should be appended to. You only need to set this if you can't set the base URL on the API side. | `https://zws.im` if `Api.url` is set to default, otherwise the value of `Api.url` |\n\n## Installation\n\nNimble is the preferred way to install the CLI and is the best option for regular use.\n\nDocker is easiest for testing but containers are slower compared to native host execution.\n\n### Nimble\n\n1. [Install Nim and Nimble](https://nim-lang.org/install.html)\n2. Install via Nimble\n\n   ```sh\n   nimble install zws\n   ```\n\n### Docker\n\nAn official Docker image is published [on Docker Hub as `zwsim/cli`](https://hub.docker.com/repository/docker/zwsim/cli/general).\n\n```sh\ndocker run --rm zwsim/cli [options] url\n```\n\n### Manual installation\n\n1. Download a binary from the [latest release](https://github.com/zws-im/cli/releases/latest)\n2. Add the binary to your `PATH`\n3. Windows users will also need to add [these DLLs](https://nim-lang.org/download/dlls.zip) to their `PATH`\n\n[zws]: https://github.com/zws-im/zws\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzws-im%2Fcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzws-im%2Fcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzws-im%2Fcli/lists"}