Skip to main content

Client for territory.dev

Project description

Uploading sources with the territory.dev CLI client

Watch a video walkthrough:

YouTube video showing an example of using the client

1. Clone a git repository and generate compile_commands.json

See examples of how compile_commands.json can be generated here.

2. Add a new repo in the territory.dev interface

Go to settings,

find the "Add" button under Repositories,

enter repository details and choose the "Uploaded" option,

create the new repository by clicking "Save".

3. Install the client

Install with pip within a Python virtualenv:

pip install territory

4. Run the upload

In the directory containing compile_commands.json run

territory upload --repo-id $YOUR_REPOSITORY_ID

The specific command containing the repository ID can be found in repository settings under "Recent builds".

First time you use the client, we will open the web brower and you will be asked to authenticate the client in the web app.

Once the upload finishes, indexing will start.

Non-interactive authentication

In case you need to run the upload in an environment where the browser authentication flow is not suitable (e.g. a CI build), you can provide the necessary token manually.

  1. In "Settings" go to to Upload tokens.
  2. Create a new token and save its text to a file.
  3. Point the CLI to the file by adding the --upload-token-path, e.g.:
    territory upload \
        --upload-token-path /path/to/token \
        --repo-id $YOUR_REPOSITORY_ID
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

territory-1.3.5.tar.gz (232.3 kB view details)

Uploaded Source

Built Distribution

territory-1.3.5-py2.py3-none-any.whl (10.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file territory-1.3.5.tar.gz.

File metadata

  • Download URL: territory-1.3.5.tar.gz
  • Upload date:
  • Size: 232.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for territory-1.3.5.tar.gz
Algorithm Hash digest
SHA256 43c2d4e4a6927d4114ae9ecab9081d1b910060ba0b75a6a890281e2c482a3b27
MD5 ca7a26be3f8c961fdff56c3c766e066c
BLAKE2b-256 a3bb6c601883fc7a6eefa641dd2200c1a5232896fbc39e3f25e87f996eb1df31

See more details on using hashes here.

File details

Details for the file territory-1.3.5-py2.py3-none-any.whl.

File metadata

  • Download URL: territory-1.3.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.3

File hashes

Hashes for territory-1.3.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 904b3d5408f09f4711eacb6caf9b7c33263e7359d0eea4519c31c0d10b2e38a1
MD5 e781c86a26b7887bdc93d0a1e692d94b
BLAKE2b-256 cd02dff74d1e23d4964740077a542caedad45c369f5937ee09adff15b2e582c4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page