Client for territory.dev
Project description
Uploading sources with the territory.dev CLI client
Watch a video walkthrough:
1. Prepare your repository
For C/C++ Projects
Clone your repository and generate compile_commands.json
. See examples of how this can be generated
here.
For Go Projects
Clone your repository and ensure your Go module is properly initialized:
go mod download
2. Add a new repo in the territory.dev interface
Go to settings,
find the "Add" button under Repositories,
enter repository details, choose the "Uploaded" option, and select the appropriate language (C/C++ or Go),
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
For C/C++ Projects
In the directory containing compile_commands.json
run:
territory upload --repo-id $YOUR_REPOSITORY_ID -l c
For Go Projects
In your git repository run:
territory upload --repo-id $YOUR_REPOSITORY_ID -l go
We will scan the repo for modules, package parse results and send the code for indexing.
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 browser 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.
- In "Settings" go to to Upload tokens.
- Create a new token and save its text to a file.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file territory-1.3.8.tar.gz
.
File metadata
- Download URL: territory-1.3.8.tar.gz
- Upload date:
- Size: 232.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b558ed6e210b1afac98b53cc9057824814f22d401a5d61975d20f6f54bb3e260 |
|
MD5 | 6004e7e753cc1e5dac685ab326a00cdc |
|
BLAKE2b-256 | 617ca3bca842f71f87ffaec35f28858a2ab3cc0a0975391e369813ecd29ec4ac |
File details
Details for the file territory-1.3.8-py2.py3-none-any.whl
.
File metadata
- Download URL: territory-1.3.8-py2.py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6acdcbba2351fdab8e86279902febae3607c7d07756880173b4227075939e370 |
|
MD5 | c571a228d0dd580638e56afb07633052 |
|
BLAKE2b-256 | fa17713f8fb6a20155ec261229a23631053fa4c85ce1c05ba85d9113bcfd95ad |