Skip to content

foomo/posh

Go Report Card GoDoc Github All Releases Docker Pulls GitHub stars

posh-providers

Project Oriented SHELL (posh)

Think of posh as an interactive, isolated and hackable Makefile

Installation

Homebrew (macOS / Linux)
brew install foomo/tap/posh

See the foomo/homebrew-tap repository.

Docker
docker run --rm foomo/posh:latest --help

Multi-arch images (amd64, arm64) are published to Docker Hub.

mise
mise use github:foomo/posh

or run directly:

mise x github:foomo/posh -- --help

See mise.jdx.dev.

Binary release

Download the archive for your OS/arch from the releases page and extract posh into your $PATH.

go install
go install github.com/foomo/posh/cmd/posh@latest

Requires Go 1.26+.

Usage

$ posh help
Project Oriented Shell (posh)

Usage:
  posh [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  config      Print loaded configuration
  help        Help about any command
  init        Initialize a Project Oriented Shell
  version     Print the version

Flags:
  -h, --help           help for posh
      --level string   set log level (default: info) (default "info")
      --no-color       disabled colors (default: false)

Use "posh [command] --help" for more information about a command.

To start using posh, go into your project and run:

$ cd your/project
$ posh init

This will generate the standard layout for posh which can be changed as required through .posh.yml.

version: v1.0

## Prompt settings
prompt:
  title: "Posh"
  prefix: "posh >"
  history:
    limit: 100
    filename: .posh/.history
    lockFilename: .posh/.history.lock

## Environment variables
env:
  - name: PATH
    value: "${PROJECT_ROOT}/bin:${PATH}"

## Ownbrew settings
ownbrew:
  binDir: "bin"
  tapDir: ".posh/scripts/ownbrew"
  tempDir: ".posh/tmp"
  cellarDir: ".posh/bin"
  packages: []
    ## Remote package
    ## See `https://github.com/foomo/ownbrew-tap`
    #- name: gotsrpc
    #  tap: foomo/tap/foomo/gotsrpc
    #  version: 2.6.2
    ## Local package `.posh/scripts/ownbrew`
    #- name: example
    #  version: 0.0.0

## Requirement settings
require:
  ## Required environment variables
  envs: []
    ## Example: require VOLTA_HOME
    #- name: VOLTA_HOME
    #  help: |
    #    Missing required $VOLTA_HOME env var.
    #
    #    Please initialize volta and ensure $VOLTA_HOME is set:
    #
    #      $ volta setup

  ## Required scripts that need to succeed
  scripts: []
    ## Example: git
    #- name: git
    #  command: |
    #    git status && exit 0 || exit 1
    #  help: |
    #    This is not a git repo. Please clone the repository

    ## Example: npm
    #- name: npm
    #  command: npm whoami --registry=https://npm.pkg.github.com > /dev/null 2>&1
    #  help: |
    #    You're not yet logged into the github npm registry!
    #
    #      $ npm login --scope=@<SCOPE> --registry=https://npm.pkg.github.com
    #      Username: [GITHUB_USERNAME]
    #      Password: [GITHUB_TOKEN]
    #      Email: [EMAIL]

  ## Required packages to be installed on the host
  packages: []
    ## Example: git
    #- name: git
    #  version: '~2'
    #  command: git version | awk '{print $3}'
    #  help: |
    #    Please ensure you have 'git' installed in the required version: %s!
    #
    #      $ brew update
    #      $ brew install git

    ## Example: go
    #- name: go
    #  version: '>=1.23'
    #  command: go env GOVERSION | cut -c3-
    #  help: |
    #    Please ensure you have 'go' installed in the required version: %s!
    #
    #      $ brew update
    #      $ brew install go

    #- name: volta
    #  version: '>=2'
    #  command: volta --version
    #  help: |
    #    Please ensure you have 'volta' installed in a recent version: %s!
    #
    #      $ curl https://get.volta.sh | bash
    #
    #    Or see the documentation: https://docs.volta.sh/guide/getting-started


## Integrations

## Example: Custom
welcome:
  message: Hi, thanks for using POSH!

Once initialized, you can start posh through:

$ make shell

How to Contribute

Contributions are welcome! Please read the contributing guide.

Contributors

License

Distributed under MIT License, please see the license file within the code for more details.

Made with ♥ foomo by bestbytes

About

Project Oriented Shell (posh)

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors

Languages