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

freted

v0.2.4

Published

FreteBras development CLI

Downloads

6

Readme

freted

oclif Version Downloads/week License

freted banner

About

$ freted uses Docker and Git to manage environments for local development of distributed systems. It works like a dependency manager (like Composer and npm) to resolve dependencies and start all on your local machine.

Technology

  • Docker
  • Node
  • Oclif
  • TypeScript
  • Traefik

Requirements

To use freted you need the following dependencies installed in your machine:

  • Docker
  • Git
  • Node >= 10

Getting started

To start using freted, follow those steps:

1. Install freted

Using NPM

$ npm install -g freted

2. Authenticate with GitLab or GitHub

$ freted login

3. Start a service

Enter the service name as an argument to the start command. The service name is the URL of the repository without the protocol. For example, for the repository https://github.com/myorg/myproject the name is github.com/myorg/myproject.

If the repository don't exists locally, freted will clone in your workspace if you granted your credentials using $ freted login.

If you are working on a new project and it doesn't have a repository yet, freted will try to resolve the local directory within your workspace.

$ freted start github.com/myorg/myproject

This command will resolve and start the project and all it's dependencies and print a resume of all services.

Configuring services

To allow a project to be run with freted, create a file on the root of your project named freted.yml with the following content:

name: github.com/myorg/myproject
description: My awesome project

You can find a full example of a config file on the repository at here.

Commands

You can define the commands to setup, start and stop your services.

  • setup: will be run when you start the service for the first time.
  • start: will be run when you start the service.
  • stop: will be run when you stop the service.
setup:
  - docker-compose build

start:
  - docker-compose up -d

stop:
  - docker-compose down

Dependencies

freted is also a dependency manager. If you have a service (like a SPA) that depends on another (like an API), you can declare this dependency on freted.yml:

dependencies:
  - github.com/myorg/myproject2

optionalDependencies:
  - github.com/myorg/myproject3

Credentials and instructions

You can use the freted.yml to put default credentials and quick notes for the developers. Those instructions will be shown on the terminal after the application starts.

instructions:
  - Sign-in using one of the credentials provided.

credentials:
  - name: Active user
    description: User active on the app
    email: [email protected]
    password: mysecretpass

HTTP entrypoint

freted uses Traefik to facilitate the organization and communication between all services. The Traefik container is automatically managed by freted.

If your service can be accessed through HTTP, edit the freted.yml and add the following config:

routes:
  - host: myproject.myorg.local
    backend: docker
    destination: mycontainer_app
    port: 80

The field destination must be the name of the running container. With docker compose, set the field container_name on the service and use the same name here.

CLI Usage

$ npm install -g freted
$ freted COMMAND
running command...
$ freted (-v|--version|version)
freted/0.2.4 darwin-x64 node-v12.17.0
$ freted --help [COMMAND]
USAGE
  $ freted COMMAND
...

Commands

freted configure

configure freted

USAGE
  $ freted configure

EXAMPLE
  $ freted configure

See code: src/commands/configure.ts

freted help [COMMAND]

display help for freted

USAGE
  $ freted help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

freted inspect SERVICE

inspect a service

USAGE
  $ freted inspect SERVICE

ARGUMENTS
  SERVICE  name of the service

EXAMPLE
  $ freted inspect github.com/myorg/myproject

See code: src/commands/inspect.ts

freted login

authenticate to supported providers

USAGE
  $ freted login

EXAMPLE
  $ freted login

See code: src/commands/login.ts

freted logs

show services logs

USAGE
  $ freted logs

EXAMPLE
  $ freted logs

See code: src/commands/logs.ts

freted restart SERVICE

restart a service

USAGE
  $ freted restart SERVICE

ARGUMENTS
  SERVICE  name of the service to restart

EXAMPLE
  $ freted restart github.com/myorg/myproject

See code: src/commands/restart.ts

freted start SERVICE

start a service

USAGE
  $ freted start SERVICE

ARGUMENTS
  SERVICE  name of the service to start

OPTIONS
  --no-dependencies           don't start service dependencies
  --no-optional-dependencies  don't start service optional dependencies

EXAMPLE
  $ freted start github.com/myorg/myproject

See code: src/commands/start.ts

freted stop SERVICE

stop a service

USAGE
  $ freted stop SERVICE

ARGUMENTS
  SERVICE  name of the service to stop

OPTIONS
  --no-dependencies           don't start service dependencies
  --no-optional-dependencies  don't start service optional dependencies

EXAMPLE
  $ freted stop github.com/myorg/myproject

See code: src/commands/stop.ts