Dev is a Makefile replacement for modern development environments

Overview

Dev

Continous integration

Dev is a Makefile replacement for modern development environments. Dev let's you manage cloned repositories, setup or teardown environments, execute commands, open pull requests and more. Dev is currently only supported on macOS.

Installation

Install dev by running the installer:

curl -s https://raw.githubusercontent.com/MasonData/dev/main/install.sh | sh

Getting started

Dev commands are defined in a Devfile, it maps a command to pre-defined tasks. Here is an example file:

name: dev

up:
    - python: 3.10.0
    - pip: requirements/development.txt
commands:
    test: py.test --color=yes
    style:
        - run: yapf -rip dev
        - run: flake8 .
    upload:
        - pypi: upload

Running a command:

$ dev test
=> Running command: py.test --color=yes
============================= test session starts ==============================
platform darwin -- Python 3.10.0, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /Users/alex/src/github.com/MasonData/dev
collected 5 items

tests/test_cli.py .....                                                  [100%]

============================== 5 passed in 0.27s ===============================

Managing git clones

Clone and navigate repositores with clone and cd commands. Clone repositores in a unified way and navigate between them using fuzzy search.

~/src/github.com/MasonData/dev $ dev clone hookit
Cloning into '/Users/alex/src/github.com/MasonData/hookit'...
remote: Enumerating objects: 153, done.
remote: Total 153 (delta 0), reused 0 (delta 0), pack-reused 153
Receiving objects: 100% (153/153), 23.12 KiB | 3.30 MiB/s, done.
Resolving deltas: 100% (69/69), done.
~/src/github.com/MasonData/hookit $ dev cd dev
~/src/github.com/MasonData/dev $

Helpful fuzzy search for faster repository navigation:

$ dev cd heroku
Found multiple matches, select which one you meant:
┏━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Index ┃ Repository                ┃ Organization ┃ Host       ┃ Path                                                           ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│   1   │ heroku-buildpack-yarn     │ MasonData    │ github.com │ /Users/alex/src/github.com/MasonData/heroku-buildpack-yarn     │
│   2   │ heroku-buildpack-swig-lib │ MasonData    │ github.com │ /Users/alex/src/github.com/MasonData/heroku-buildpack-swig-lib │
└───────┴───────────────────────────┴──────────────┴────────────┴────────────────────────────────────────────────────────────────┘
Which one? (1):

Browser links

Dev provide a way to open links related to your project. A new pull request or issue can easily be opened if your project is hosted on Github. Custom links are added to your Devfile.

open:
    actions: https://github.com/MasonData/dev/actions

Open links using the dev open command:

$ dev open actions
=> Running command: open https://github.com/MasonData/dev/actions

$ dev open pr
=> Running command: open https://github.com/MasonData/dev/pull/open-url

$ dev open issue
=> Running command: open https://github.com/MasonData/dev/issues/new

Bundled tasks

You can list all tasks available to Dev using the --tasks flag. This will list all bundled tasks and locally provided custom tasks.

$ dev --tasks
                            Tasks
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Task                ┃ Description                          ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ docker_compose      │ Manage docker-compose                │
│ docker_compose_exec │ Run shell commands in docker-compose │
│ homebrew            │ Install formulas on macOS            │
│ homebrew_cask       │ Install cask formulas on macOS       │
│ python              │ Install a specific Python version    │
│ run                 │ Run shell commands                   │
│ pip                 │ Run pip install                      │
│ pypi                │ Manage packages on PyPi              │
└─────────────────────┴──────────────────────────────────────┘

Custom tasks

Dev provides a handful of common and useful tasks by default, but you might want to define your own to simplify your Devfile. A new task can easily be defined in your project by placing it in a devs module.

  1. Create devs.custom_task and define a class named CustomTask with a up and optionally a down method:

    from dev.task import Task
    
    
    class CustomTask(Task):
        __description__ = 'Demo custom task'
    
        def up(self, args, extra_args):
            print('Hello world!')
    
        def down(self, args, extra_args):
            print('Bye world!')
  2. Reference your new task in your Devfile:

    name: project
    
    up:
        - custom_task
    commands:
        hello:
            - custom_task
    
  3. Try using it:

    $ dev up
    Hello world!
    
    $ dev down
    Bye world!
    
    $ dev hello
    Hello world!
    

Uninstall

Simply remove your /opt/dev directory and any reference in your shell config. Restart your shell to clear loaded environment functions.

License

This project is licensed under the terms of the MIT license.

Inspiration for building this tool comes from an internal tool at Shopify. You can read more about it here: https://devproductivity.io/dev-shopifys-all-purpose-development-tool/

You might also like...
Visualize Data From Stray Scanner https://keke.dev/blog/2021/03/10/Stray-Scanner.html

StrayVisualizer A set of scripts to work with data collected using Stray Scanner. Usage Installing Dependencies Install dependencies with pip -r requi

A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/

This is a PyPI mirror client according to PEP 381 + PEP 503 http://www.python.org/dev/peps/pep-0381/. bandersnatch =4.0 supports Linux, MacOSX + Wind

bespoke tooling for offensive security's Windows Usermode Exploit Dev course (OSED)
bespoke tooling for offensive security's Windows Usermode Exploit Dev course (OSED)

osed-scripts bespoke tooling for offensive security's Windows Usermode Exploit Dev course (OSED) Table of Contents Standalone Scripts egghunter.py fin

Backend/API for the Mumble.dev, an open source social media application.
Backend/API for the Mumble.dev, an open source social media application.

Welcome to the Mumble Api Repository Getting Started If you are trying to use this project for the first time, you can get up and running by following

A simple Django dev environment setup with docker for demo purposes for GalsenDev community

GalsenDEV Docker Demo This is a basic Django dev environment setup with docker and docker-compose for a GalsenDev Meetup. The main purposes was to mak

Workshop for student hackathons focused on IoT dev
Workshop for student hackathons focused on IoT dev

Scenario: The Mutt Matcher (IoT version) According to the World Health Organization there are more than 200 million stray dogs worldwide. The American

flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

This reporistory contains the test-dev data of the paper "xGQA: Cross-lingual Visual Question Answering".

This reporistory contains the test-dev data of the paper "xGQA: Cross-lingual Visual Question Answering".

Get a Django app up and running in dev, test, and production with best practices in 10 minutes

Django template for Docker + Heroku This is how I set up Django projects to get up and running as quick as possible. In includes a few neat things: De

Dev Centric Tools for Mkdocs Based Documentation
Dev Centric Tools for Mkdocs Based Documentation

docutools MkDocs Documentation Tools For Developers This repo is providing a set of plugins for mkdocs material compatible documentation. It is meant

Tutorial para o projeto negros.dev - A Essência do Django
Tutorial para o projeto negros.dev - A Essência do Django

Negros Dev Tutorial para o site negros.dev Este projeto foi feito com: Python 3.8.9 Django 3.1.8 Bootstrap 4.0 Como rodar o projeto? Clone esse reposi

Filters to block and remove copycat-websites from DuckDuckGo and Google. Specific to dev websites like StackOverflow or GitHub.

uBlock-Origin-dev-filter Filters to block and remove copycat-websites from DuckDuckGo and Google. Specific to dev websites like StackOverflow or GitHu

Simpliest django(uvicorn)+postgresql+nginx docker-compose (ready for production and dev)

simpliest django(uvicorn)+postgresql+nginx docker-compose (ready for production and dev) To run in production: docker-compose up -d Site available on

Telegram hack bot [ For Dev ]

Telegram hack bot [ For Dev ]

Wagtail - Vue - Django : The initial environment of full-stack local dev web app with wagtail and vue

Wagtail - Vue - Django : The initial environment of full-stack local dev web app with wagtail and vue. A demo to show how to use .vue files inside django app.

Dev-meme - A repository that contains memes just for people like us
Dev-meme - A repository that contains memes just for people like us

A repository that contains memes just for people like us. Coders are constantly

A twitter bot that simply replies with a beautiful screenshot of the tweet, powered by beautify.dhravya.dev
A twitter bot that simply replies with a beautiful screenshot of the tweet, powered by beautify.dhravya.dev

Poet this! Replies with a beautiful screenshot of the tweet, powered by poet.so Installation git clone https://github.com/dhravya/poet-this.git cd po

Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.
Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap.

Xadmin Drop-in replacement of Django admin comes with lots of goodies, fully extensible with plugin support, pretty UI based on Twitter Bootstrap. Liv

pdb++, a drop-in replacement for pdb (the Python debugger)
pdb++, a drop-in replacement for pdb (the Python debugger)

pdb++, a drop-in replacement for pdb What is it? This module is an extension of the pdb module of the standard library. It is meant to be fully compat

Comments
  • Make mkcert work with Firefox

    Make mkcert work with Firefox

    $ mkcert -install
    The local CA is already installed in the system trust store! 👍
    Warning: "certutil" is not available, so the CA can't be automatically installed in Firefox! ⚠️
    Install "certutil" with "brew install nss" and re-run "mkcert -install" 👈
    
    opened by tiwilliam 0
Owner
Mason Data
Mason Data
A user-friendly research and development tool built to standardize RL competency assessment for custom agents and environments.

Built with ❤️ by Sam Showalter Contents Overview Installation Dependencies Usage Scripts Standard Execution Environment Development Environment Benchm

SRI-AIC 1 Nov 18, 2021
Container images for portable development environments

Docker Dev Spin up a container to develop from anywhere! To run, just: docker run -ti aghost7/nodejs-dev:boron tmux new Alternatively, if on Linux: p

Jonathan Boudreau 163 Dec 22, 2022
Traditionally, there is considerable friction for developers when setting up development environments

This self-led, half-day training will teach participants the patterns and best practices for working with GitHub Codespaces

CSE Labs at Spark 12 Dec 2, 2022
Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Textual is a TUI (Text User Interface) framework for Python inspired by modern web development.

Will McGugan 17.1k Jan 8, 2023
Textual: a TUI (Text User Interface) framework for Python inspired by modern web development

Textual Textual is a TUI (Text User Interface) framework for Python inspired by

null 17.1k Jan 4, 2023
An open source development framework to help you build data workflows and modern data architecture on AWS.

AWS DataOps Development Kit (DDK) The AWS DataOps Development Kit is an open source development framework for customers that build data workflows and

Amazon Web Services - Labs 111 Dec 23, 2022
Dante, my discord bot. Open source project in development and not optimized for other filesystems, install and setup script in development

DanteMode (In private development for ~6 months) Dante, my discord bot. Open source project in development and not optimized for other filesystems, in

null 2 Nov 5, 2021
A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/

This is a PyPI mirror client according to PEP 381 + PEP 503 http://www.python.org/dev/peps/pep-0381/. bandersnatch >=4.0 supports Linux, MacOSX + Wind

Python Packaging Authority 345 Dec 28, 2022
Repo Home WPDrawBot - (Repo, Home, WP) A powerful programmatic 2D drawing application for MacOS X which generates graphics from Python scripts. (graphics, dev, mac)

DrawBot DrawBot is a powerful, free application for macOS that invites you to write Python scripts to generate two-dimensional graphics. The built-in

Frederik Berlaen 342 Dec 27, 2022
Build, test, deploy, iterate - Dev and prod tool for data science pipelines

Prodmodel is a build system for data science pipelines. Users, testers, contributors are welcome! Motivation · Concepts · Installation · Usage · Contr

Prodmodel 53 Nov 29, 2022