npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@txty-io/txty-cli

v1.0.2

Published

The official command-line tool to interact with Txty.

Downloads

3

Readme

Txty CLI

License Open Issues

Official CLI to interact with Txty.

This extension allows you to add keys and download your translations without leaving your terminal.

For more information about Txty visit https://github.com/txty/txty.

Installation

yarn global add @txty-io/txty-cli

or

npm install -g @txty-io/txty-cli

Authentication

The txty utility can be configured by placing a .txty.json in your home folder.

Authenticate via global config

The authentication against the Txty server is configured in the global ~/.txty.json configuration file. Make sure to always keep the global config file private.

Example ~/.txty.json

{
    "auth_email": "[email protected]",
    "auth_secret": "aG2DzuoWG30a3IHwOKMQUg"
}

| Option | Description | Optional | | ----------- | ----------------------------------------------------------------------------------------------- | -------- | | auth_email | The email you use to log in on Txty. | No | | auth_secret | An access token you can generate at https://app.txty.io/dashboard/settings/access-tokens. | No |

Authenticate by passing auth credentials to commands

You can also pass the auth credentials to the CLI tool by adding --auth-email=<value> and --auth-secret=<value> to your command.

CLI passed auth credentials have precedence over those defined in the global config.

Project Config

It is recommended that you put the project config txty.json in the root directory of your project (otherwise you need to set project_path).

No sensitive data should be stored in your project config so you can safely check this file in with your code and share it with others.

Example txty.json

{
    "api_base_url": "https://app.txty.io/api",
    "api_version": "v1",
    "project_id": "b53faf34-934a-491b-84aa-d880f3c2bce8",
    "export_configuration_id": "9bd1edfc-9d43-449d-9e51-7990630baf74",
    "export_directory": "translations",
    "project_path": ""
}

| Option | Description | Optional | | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------- | | api_base_url | The path where the API is located usually ending in /api. | No | | api_version | The version of the API (for now only v1 is available). | No | | project_id | The project you want to manage. The project ID can be found on the project overview site or in the URL of the project sites. | No | | export_configuration_id | The ID of the export configuration. This can also be configured with --export-config-id on the command line. | No | | export_directory | The directory where your translations will be exported to. | No | | project_path | The path to your project. This can also be configured with --project-path on the command line. | Yes |

Usage

If you have successfully configured your project you can try to do txty <command> in the directory where you placed your project config. To get a list of all commands your current version supports try txty -h.

Upgrade

yarn global upgrade @txty-io/txty-cli@latest
npm install -g @txty-io/txty-cli@latest

Contributing

Start the watcher with yarn start:watcher so your source code gets automatically compiled. Use the yarn start command to run the program.

Example command for testing

yarn start add "my.key" "my description" [email protected] --auth-secret=SECRET

Release a new version

Run the following commands:

yarn release

License

License

This project is licensed under the MIT License. See the LICENSE file for details.