{"id":21988152,"url":"https://github.com/transip/tipctl","last_synced_at":"2025-08-22T01:32:39.580Z","repository":{"id":37588507,"uuid":"239771366","full_name":"transip/tipctl","owner":"transip","description":"The command line interface for the TransIP API","archived":false,"fork":false,"pushed_at":"2024-11-06T15:38:22.000Z","size":755,"stargazers_count":16,"open_issues_count":6,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-13T06:43:36.733Z","etag":null,"topics":["api","cli","client","rest","transip","transip-api-v6"],"latest_commit_sha":null,"homepage":"https://api.transip.nl/rest/docs.html","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/transip.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"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}},"created_at":"2020-02-11T13:41:46.000Z","updated_at":"2024-05-06T13:18:09.000Z","dependencies_parsed_at":"2024-03-04T10:27:18.905Z","dependency_job_id":"5c42b63d-cea5-4d8a-b61e-10dc84bb7872","html_url":"https://github.com/transip/tipctl","commit_stats":{"total_commits":240,"total_committers":17,"mean_commits":"14.117647058823529","dds":"0.49583333333333335","last_synced_commit":"b5b9964ba504302929042d5d0c58836aa3f940f1"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transip%2Ftipctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transip%2Ftipctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transip%2Ftipctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/transip%2Ftipctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/transip","download_url":"https://codeload.github.com/transip/tipctl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230547678,"owners_count":18243227,"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","client","rest","transip","transip-api-v6"],"created_at":"2024-11-29T19:16:00.241Z","updated_at":"2024-12-20T07:07:04.167Z","avatar_url":"https://github.com/transip.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ca href=\"https://transip.eu\" target=\"_blank\"\u003e\n    \u003cimg width=\"200px\" src=\"https://www.transip.nl/img/cp/transip-logo.svg\"\u003e\n\u003c/a\u003e\n\n# Tipctl\n\nTransIP Control (tipctl) is a tool that connects to the TransIP API from your terminal. It has all available resources implemented from the [TransIP RestAPI](https://api.transip.nl/rest/docs.html), and offers you commands to order, update and remove products from your TransIP account.  \n\n[![Latest Stable Version](https://poser.pugx.org/transip/tipctl/v/stable?format=flat-square)](https://packagist.org/packages/transip/tipctl)\n[![License](https://poser.pugx.org/transip/tipctl/license?format=flat-square)](https://packagist.org/packages/transip/tipctl)\n\n## Requirements\n\n* PHP 7.2.0 or later.\n* [json](https://www.php.net/manual/en/book.json.php) (php extension)\n* [openssl](https://www.php.net/manual/en/book.openssl.php) (php extension)\n\n## Installation\n\nThere are two ways you can install Tipctl.\n\n### Download and install the PHAR file\n\nThis can be downloaded from our most recent [GitHub Release](https://github.com/transip/tipctl/releases).\n \nOnce the file has been downloaded, you must make sure that the phar file has a correct permission for it to be an executable.\n```shell script\n# Go to tipctl.phar\ncd /path/to/tipctl\n\n# Make phar file executable\nchmod +x ./tipctl.phar\n\n# Test if the tipctl is executable\n./tipctl.phar --version\n```\nIt is important to note that you must use `./` every time to indicate you are using the tipctl executable from your current directory. This is because the command line (bash) interprets all commands by looking for commands in locations described in the environment variable `$PATH`. If you want to use the tipctl command globally, then we recommend installing using composer.\n\n### Install with Composer\n\nYou can install Tipctl using [Composer](http://getcomposer.org/). Run the following command:\n\n```shell script\ncomposer global require transip/tipctl\n```\n\nNow that the tipctl binary is available globally, make sure that your global vendor binaries directory is included in your environment `$PATH` variable. You can get the vendor binaries directory by using the following command:\n```shell script\ncomposer global config bin-dir --absolute\n```\n\nNow execute the following command to see the version of tipctl installed:\n```shell script\ntipctl --version\n```\n\n## Getting started\n\nRun the user interactive setup script\n```shell script\ntipctl setup\n```\n\nYou can also run the setup script with no user interaction\n```shell script\ntipctl setup --no-interaction --apiUrl='https://api.transip.nl/v6' --loginName='yourUsername' --apiPrivateKey='yourKeyPair' --apiUseWhitelist=true\n\n# When using spaces to separate an option from its value, you must escape the beginning of your private key\ntipctl setup --no-interaction --apiUrl 'https://api.transip.nl/v6' --loginName 'yourUsername' --apiPrivateKey '\\-----BEGIN PRIVATE KEY-----...' --apiUseWhitelist=true\n```\n\n## Usage / Commands\n\n### List all available commands\n\n```shell script\ntipctl list\n```\n\n### List all of your domains\n\n```shell script\ntipctl domain:getall\n```\n\n### Update a single DNS record on your domain\n\n```shell script\n# See usage information\ntipctl domain:dns:updatednsentry -h\n\n# Update a DNS record\ntipctl domain:dns:updatednsentry example.com subdomain 300 A 37.97.254.1\n```\n\n### Understanding how to use the help argument\n\nWhen using tipctl you can use a `-h` argument to get information about how a specified command works.\n\n```shell script\n# Passing a help argument to any command\n# tipctl \u003canycommand\u003e -h\n```\n\nFrom the above example, the help argument should be used and interpeted like this:\n\n```shell script\n# Example for attach vps command\ntipctl bigstorage:attachvps -h\n```\n\nAnd this will output the following:\n```\nDescription:\n  Attach your big storage to your vps\n\nUsage:\n  bigstorage:attachvps [options] [--] \u003cBigStorageName\u003e \u003cVpsName\u003e\n\nArguments:\n  BigStorageName         The name of the big storage\n  VpsName                Name of the vps that the big storage should attach to.\n```\n\nUsage example and how it should be interpeted\n```shell script\n# We look at the following usage example:\n# bigstorage:attachvps [options] [--] \u003cBigStorageName\u003e \u003cVpsName\u003e\n\n# Interpertation of the above\ntipctl bigstorage:attachvps example-bigstorage3 examples-vps4\n```\n\n## Demo / Read Only Modes\n\n### Test mode\n\nTest mode allows you to connect to your TransIP account and execute actions without making any changes to your products or your account. In the test process, all actions are evaluated as best as possible, comparable to production mode. If any given argument is incorrect, then you will see errors that explain why a query was unsuccessful.  \n\nWhile executing any command, you can provide an argument called `--test`. This lets our API know that the command you executed is a test and no changes will occur in your TransIP account. \n```shell script\n# Example for all commands\n# tipctl --test \u003ccommand\u003e \u003carguments\u003e\n\n# How you should use this\ntipctl --test vps:order vps-bladevps-x1 debian-9\n```\n\n### Demo mode\n\nDemo mode allows you to connect to the [TransIP demo account](https://www.transip.nl/demo-account/) and interact with the demo account to give you perspective on how you can use Tipctl with a TransIP account.\n\n```shell script\n# Example for all commands\n# tipctl --demo \u003ccommand\u003e\n\n# How this should be used\ntipctl --demo vps:getall\n```\n\n# RestAPI Library\n## How PHP resource calls are implemented\n\nSince this project is built on the RestAPI PHP library, in the [library README.md](https://github.com/transip/transip-api-php/blob/master/README.md) we recommend to look in to this CLI project for examples on how we have implemented the available resource calls that exist in the RestAPI library.\n\n### Where to find the implementations\n\nAll commands implemented in this project are located inside the `src/Command/` directory. Each class represents a command for Tipctl. \n\nEvery class has a execute method that will look like this:\n```php\nprotected function execute(InputInterface $input, OutputInterface $output)\n{\n    $domains = $this-\u003egetTransipApi()-\u003edomains()-\u003egetAll();\n    $this-\u003eoutput($domains);\n}\n```\n\nThe code snippet in the code above is equivalent to this library example:\n```php\n$domains = $api-\u003edomains()-\u003egetAll();\n```\n\nTo see how to retrieve all invoices in your TransIP account, you would look in to the file: `src/Command/Invoice/GetAll.php`\n\nThe code example for this should be interpreted like this:\n\n```php\n/**\n* Implementation in tipctl\n */\nprotected function execute(InputInterface $input, OutputInterface $output)\n{\n    $page = $input-\u003egetArgument(Field::PAGE);\n    $itemsPerPage = $input-\u003egetArgument(Field::ITEMS_PER_PAGE);\n\n    $invoices = $this-\u003egetTransipApi()-\u003einvoice()-\u003egetSelection($page, $itemsPerPage);\n\n    $this-\u003eoutput($invoices);\n}\n\n/**\n* How this implementation should be interpreted and used when using the RestAPI library\n */\n$page = 1;\n$itemsPerPage = 25;\n$invoices = $api-\u003einvoice()-\u003egetSelection($page, $itemsPerPage);\nprint_r($invoices);\n```\n\nTo see all implementations in this project, you can see what commands are available by downloading Tipctl and listing all available commands. You can then use this as a reference point to find your desired class.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransip%2Ftipctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftransip%2Ftipctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftransip%2Ftipctl/lists"}