Giter Site home page Giter Site logo

warpdotdev / workflows Goto Github PK

View Code? Open in Web Editor NEW
619.0 18.0 127.0 450 KB

Workflows make it easy to browse, search, execute and share commands (or a series of commands)--without needing to leave your terminal.

Home Page: https://commands.dev

License: Apache License 2.0

Shell 14.62% Rust 66.53% TypeScript 12.48% JavaScript 6.38%
bash zsh fish

workflows's Introduction

Workflows

The repo for all public Workflows that appear within Warp and within commands.dev.

To learn how to create local or repository workflows, see our docs.

image

What are Workflows?

Workflows are an easier way to execute and share commands within Warp. They are searchable by name, description, or command and are easily parameterized. See our documentation for more details: https://docs.warp.dev/features/workflows

How Do I Access Workflows within Warp?

Workflows can be accessed directly within Warp, either through the Command Palette or by pressing ctrl-shift-r.

All public workflows (i.e. workflows within this repo) are also available at commands.dev.

Contributing

Contributions are always welcome! If you have a workflow that would be useful to many Warp users, feel free to send a PR to add a Workflow spec.

All workflows are defined as YAML files within the specs/ directory.

File Format

A comprehensive description of the file format is available in FORMAT.md. Additionally, see the workflow below as an example to quickly get started:

---
# The name of the workflow.
name: Uninstall a Homebrew package and all of its dependencies
# The corresponding command for the workflow. Any arguments should be surrounded with two curly braces. E.g `command {{arg}}`.
command: |-
    brew tap beeftornado/rmtree
    brew rmtree {{package_name}}
# Any tags that the workflow should be categorized with.
tags:
  - homebrew
# A description of the workflow.
description: Uses the external command rmtree to remove a Homebrew package and all of its dependencies
# List of arguments within the command.
arguments:
    # Name of the argument within the command. This must exactly match the name of the argument
    # within the command (without the curly braces).
  - name: package_name
    # The description of the argument.
    description: The name of the package that should be removed
    # The default value for the argument.
    default_value: ~
# The source URL for where the workflow was generated from, if any.
source_url: "https://stackoverflow.com/questions/7323261/uninstall-remove-a-homebrew-package-including-all-its-dependencies"
# The author of the workflow.
author: Ory Band
# The URL of original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author_url` would be the StackOverflow author's profile page.
author_url: "https://stackoverflow.com/users/207894"
# The valid shells where this workflow should be active. If valid for all shells, this can be left empty.
# See FORMAT.md for the full list of accepted values.
shells: []

Testing

To test a workflow within Warp before submitting, you can use it as a local workflow within warp.

To do this:

  1. Copy the workflow to your local ~/.warp/workflows directory:
    mkdir -p ~/.warp/workflows && cp {{workflow}}.yaml ~/.warp/workflows/
  2. Open Warp and open workflows by pressing ctrl-shift-r or using the command palette.
  3. Click on "My Workflows" on the left to filter for local workflows. README md โ€” workflows 2022-04-19 at 11 52 53 AM
  4. Click on the workflow you've added and ensure all the information is correct.

To quickly test if a workflow file format is valid, you can also build workflows locally to validate the schema is correct:

# Download the rust toolchain, if not already installed.
brew install rustup
rustup-init

# Ensure the workflows can successfully be converted into Rust.
cargo build

What Makes a Useful workflow?

A good workflow is one that includes a command with many flags or arguments or one that is hard to remember.

Additionally, a workflow must include:

  • A descriptive title that includes the name of the command--this is useful for improving the experience of searching for workflows in Warp or commands.dev.
  • A tag that accurately categorizes the workflows. Avoid many repetitive tags to improve searchability of workflows within Warp.
  • A description for the workflow and each of its arguments, if applicable.
  • A default value for each argument, if applicable.

workflows's People

Contributors

4cyberlord avatar alokedesai avatar apinanyogaratnam avatar burtds avatar dcdigit avatar dipakparmar avatar dominuskelvin avatar funnyzak avatar ianhodge avatar jefflloyd avatar jordanpowell88 avatar kaplanoah avatar khanhx avatar kianmeng avatar lingawakad avatar lukaszjakutowicz avatar oas004 avatar pan93412 avatar radugalbenufis avatar raulb avatar robmellett avatar sascha1337 avatar sebdanielsson avatar shivamkj avatar szgupta avatar timscodebase avatar vjindal0112 avatar webruin avatar wyatt-stanke avatar zheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

workflows's Issues

GitHub link on commands.dev is broken

The GitHub link on the header of commands.dev is pointing to https://github.com/warpdotdev/commands.dev. It's either that the link is wrong, or the repository is private. In the case that the repository is private, then maybe it should point to https://github.com/warpdotdev/workflows.

Laravel migrations

Is this a new workflow or an update?

New

What is the name of the workflow?

laravel migrate

What should the workflow do?

All the migration things like migrate, with fresh, seed and pretend

What does it do (only if it's an update)?

No response

Introduce Flags in workflows

---
 name: Create Laravel Migration, Controller, and Resource file 
 command: |-
     php artisan make:{{model_name}} post -mcr

 tags:
   - php
   - laravel
 description: Cache the framework bootstrap files

arguments:
  - name: model_name
    description: Specify a model name to generate
    default_value: ~

flags:
  - name: -mcr
    description: Generates a migration, controller, and resource files for your application
  - name: -c
    description: Generates a controller
  - name: -m
    description: Generates a model
  - name: -all
    description: Generates all resources
  - name: -request
    description: Generates a request validation file

 source_url: ""
 author: Charles Adu Boakye
 author_url: "https://github.com/4cyberlord"
shells: []

I would like to suggest the introduction of flags in workflows. The usage of flags in our commands helps speed up development. It happens to be one of the options that developers depend on for ease of development. 

Update all pip3 packages Workflow is Incorrect

What section of this project is the bug in?

Workflows

What is the bug?

The current workflow pip3 list --outdated --format=freeze | cut -d = -f 1 | xargs -n1 pip3 install -U results in ERROR: List format 'freeze' can not be used with the --outdated option.

What is the expected behavior?

The correct behavior would be a successful update of the currently installed. pip packages.

It seems like the correct command would be:
pip3 list --outdated --format=columns | tail -n +3 | awk '{print $1}' | xargs -n1 pip3 install -U

What is the actual behavior?

Running the workflow results in an error prior to initiating the package updates.

How would you replicate this bug?

Open the workflow panel, search for pip, select the Update all pip3 packages command, and press Enter.

inaccurate answer and possible bug not redering answer properly

Is this a new workflow or an update?

Update

What is the name of the workflow?

Find all files in a directory that don't contain a string

What should the workflow do?

find ALL files

What does it do (only if it's an update)?

find only files not starting with dot

Workflow param suggestions

What section of this project is the bug in?

Workflows

What is the bug?

Feature request / missing feature

What is the expected behavior?

Workflow param/args can suggest list of option from previous command, example: i run kubectl get pods, and the next workflow command i want to autocomplete/suggest the pod name based on previous command.

What is the actual behavior?

N/A

How would you replicate this bug?

N/A

Question: I added default values to arguments but they're not appearing when I use the workflow, is this a bug or intentional?

I created the following workflow locally and added arguments as specified in the .md file in the repo, however, when trying to use the workflow it shows up with the arguments names instead of the default values. Is this intentional or a bug? If intentional, what's the purpose of having default values for arguments? Maybe I'm just using it incorrectly... Anyhow, would be glad to get some help :)

name: Upload file to local backend
command: "java -jar {{suitebundleLocation}} upload -u {{serverURL}} -p {{uploadPassword}} -b {{zipFileLocation}} -n {{bundleName}}"
tags:
  - backend
  - BE
  - upload
  - bundle
arguments:
  - name: suitebundleLocation
    description: The full path to the `suitebundle.jar` file. Default = ~/Downloads/suitebundle.jar
    default_value: ~/Downloads/suitebundle.jar
  - name: serverURL
    description: The backend URL to which the file should be uploaded. Default = https://localhost:3443
    default_value: https://localhost:3443
  - name: uploadPassword
    description: The upload password from the backend config
    default_value: '12345'
  - name: zipFileLocation
    description: The full path to the bundle with the `.zip` suffix. E.G. ~/Downloads/test-bundle.zip
  - name: bundleName
    description: The name that the bundle will have on the backend server
description: "Uploads a bundle to the backend server"

So far really enjoying Warp!

Using MacBook Pro (13-inch, M1, 2020)
MacOS Monterey 12.3.1 (21E258)

Broken link: remove_local_branches_not_in_remote

What section of this project is the bug in?

Workflows

What is the bug?

The link to a particular workflow in search results is broken

What is the expected behavior?

One result, which links to the workflow's page

What is the actual behavior?

One result, but the link (https://www.commands.dev/workflows/remove_local_branches_not_in_remote) is 404 Not Found

How would you replicate this bug?

Search commands.dev for "remove all local branches" and click on the only result

Clarify workflow format

Hi, at https://github.com/warpdotdev/workflows/blob/main/FORMAT.md#shells it said the shell field can be unspecified, but it can not be omitted:

...
shells: [] << this line must exist even though you don't specify single shell name.
...

shortly, "If not specified" can be interpreted in two ways: leave it as empty array or omit the field. I think it would be much helpful to point out the very first one.

Or, maybe we can provide a bolierplate workflow file which has only required fields.

Workflow to create a workflow

Is this a new workflow or an update?

New

What is the name of the workflow?

warp > workflow

What should the workflow do?

Initialise a new workflow. Basically you can pass in some flags and it will create a local yaml file. Possibly needed to support this is a warp settings file that sets the common details needed in the yaml template such as author. However, is this a new workflow or a CLI tool for warp, I don't even know? Copying a workflow template from the internet and saving it in ~/.warp/workflows, then editing it, does not seem like how workflows should work in 2022.

What does it do (only if it's an update)?

If it's a CLI tool, I expect warp workflow init --author "Tom Smith" --type "fish" --cmd "echo 'Hello Warp!" that will initialise a workflow.

At minimum I'd expect a workflow that will download a workflow template to ~/.warp that I could then open in an editor.

how to add new workflows

I havent used this feature and this is the best one. How can i add new workflows to the warp. Can i add custom workflows to the warp. Thank you. Best regards, Gaurav

osx, workflows and command search panels dont show

What section of this project is the bug in?

Workflows

What is the bug?

workflows and command search panels dont show if you switch to different shell

What is the expected behavior?

i start the tab in zsh, and when i press control-shift-R or control-R, the panels pop up, but if i switch/launch any other shell (bash or fish), the same shortcuts do not show the pop up panels

What is the actual behavior?

if i switch/launch any other shell (bash or fish), the same shortcuts do not show the pop up panels

How would you replicate this bug?

start new tab with zsh, switch to bash, press control-shift-R or control-R and nothing shows up, and the menu options under View menu are grayed out

Don't support multi workflows defined in a single yaml file ?

I has a local workflow file like:

---
name: Show Open vswitch bridges
command: |-
    ovs-vsctl show
tags:
  - ovs
shells: []

---
name: Add a Open vswitch bridge
command: |-
    ovs-vsctl add-br {{bridge_name}}
tags:
  - ovs
description: Add a bridge
arguments:
  - name: bridge_name
    description: The name of the bridge that should be added
    default_value: mybridge
shells: []

I suppose that it will have two custom workflows recognized by warp and it doesn't work.
Can warp recognize multi workflows defined in a single yaml file now?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.