Command Reference

Here's a (long!) list of everything you can say to Serenade. For a more condensed version, check out the Cheat Sheet.

Actions and Selectors

Actions

An action describes something you want to do to code.

  • delete <selector>
  • copy <selector>
  • cut <selector>
  • change <selector> to <text>
  • select <selector>
  • type <text>
  • paste
  • indent
  • dedent

Selectors

A selector describes a block of code you want to manipulate.

Text

  • character
  • block
  • file
  • line
  • phrase <text>
  • term
  • word

Code

  • argument
  • argument list
  • assert
  • assignment
  • assignment variable
  • assignment value
  • body
  • break
  • call
  • class
  • close tag
  • condition
  • decorator
  • else
  • else if
  • finally
  • for
  • function
  • generator
  • if
  • import
  • keyword argument
  • keyword parameter
  • lambda
  • list
  • method
  • open tag
  • parameter
  • parameter list
  • parent
  • parent list
  • pass
  • property
  • return
  • return value
  • set
  • statement
  • string
  • tag
  • try
  • tuple
  • with context
  • with variable
  • while

Editor Controls

  • undo
  • redo
  • save
  • open <filename>
  • new tab
  • next tab
  • previous tab
  • close tab
  • tab {one,two,three,...}
  • split {up,down,left,right}
  • close window
  • repeat
  • up
  • down
  • left
  • right
  • go to <selector>
  • next <selector>
  • previous <selector>
  • {first,second,third,...} <selector>
  • <selector> {one,two,three,...}
  • phrase <text>

Add Commands

add <expression>

Voice:

add foo plus equals bar

Result:

foo += bar
foo += bar;
foo += bar;

add argument <identifier>

Before:

result = get()
const result = get();
String result = get();

Voice:

add argument url

Result:

result = get(url)
const result = get(url);
String result = get(url);

add catch <expression>

Voice:

add catch e

Result:

try:
    pass
except e:
    pass
try {
}
catch (e) {
}

Voice:

add catch capital exception e

Result:

try {
}
catch (Exception e) {
}

add <modifiers> class <identifier>

Voice:

add class foo

Result:

class Foo:
    pass
class Foo {
}
class Foo {
}

Voice:

add public class foo

Result:

public class Foo {
}
public class Foo {
}

add comment <text>

Voice:

add comment hello

Result:

# hello
// hello
// hello

add decorator <expression>

Before:

def get():
    pass
public void get() {
}

Voice:

add decorator foo

Result:

@foo
def get():
    pass
@Foo
public void get() {
}

add else if <expression>

Voice:

add else if true

Result:

elif True:
    pass
else if (true) {
}
else if (true) {
}

add else <body>

Voice:

add else return false

Result:

else:
    return False
else {
    return false;
}
else {
    return false;
}

add <modifiers> enum <identifier>

Voice:

add enum colors

Result:

class Colors(enum.Enum):
    pass
enum Colors {
}
enum Colors {
}

add except <expression>

Same as add catch expression.

add extends <identifier>

Before:

class Dog:
    pass
class Dog {
}
class Dog {
}

Voice:

add extends animal

Result:

class Dog(Animal):
    pass
class Dog extends Animal {
}
class Dog extends Animal {
}

add finally <expression>

Before:

try:
    pass
except:
    pass
try {
}
catch (e) {
}
try {
}
catch (Exception e) {
}

Voice:

add finally

Result:

try:
    pass
except:
    pass
finally:
    pass
try {
}
catch (e) {
}
finally {
}
try {
}
catch (Exception e) {
}
finally {
}

add for <item> in <list>

Voice:

add for item in list

Result:

for item in list:
    pass
for (const item in list) {
}
for (Object item : list) {
}

Voice:

add let item of list

Result:

for (let item of list) {
}

add <modifiers> <type> function <identifier>

Voice:

add function hello

Result:

def hello():
    pass
function hello() {
}
void hello() {
}

add if <condition>

Voice:

add if a greater than b

Result:

if a > b:
    pass
if (a > b) {
}
if (a > b) {
}

add implements <identifier>

Before:

public class Foo {
}

Voice:

add implements bar

Result:

public class Foo implements Bar {
}

add import <identifier>

Voice:

add import requests

Result:

import requests
import requests;

Voice:

add import foo from bar

Result:

import { foo } from "bar";

Voice:

add default import foo from bar

Result:

import foo from "bar";

add <modifiers> interface <identifier>

Voice:

add public interface foo

Result:

public interface Foo {
}

add <modifiers> <type> method <identifier>

Voice:

add method hello

Result:

def hello(self):
    pass
hello() {
}
void hello() {
}

Voice:

add public boolean method hello
public hello(): boolean {
}
public boolean hello() {
}

add <modifiers> <type> parameter <identifier>

Before:

def get():
    pass
function get() {
}

Voice:

add parameter url

Result:

def get(url):
    pass
function get(url) {
}

Before:

```Java tab=
public void get() {
}

Voice:

add capital string parameter url

Result:

public void get(String url) {
}

add parent <identifier>

Same as add extends identifier.

add print <expression>

Voice:

add print in quotes hello

Result:

print("hello")
console.log("hello");
System.out.println("hello");

add raise <identifier>

Same as add throw.

add return value <expression>

Before:

def get(url):
    return
function get(url) {
    return;
}
public String get(String url) {
    return;
}

Voice:

add return value url

Result:

def get(url):
    return url
function get(url) {
    return url;
}
public String get(String url) {
    return url;
}

add throw <identifier>

Voice:

add throw e
raise e
throw e;
throw e;

add try <body>

Voice:

add try foo parens

Result:

try:
    foo()
except e:
    pass
try {
    foo();
}
catch (e) {
}
try {
    foo();
}
catch (Exception e) {
}

add while <condition>

Voice:

add while true

Result:

while True:
    pass
while (true) {
}
while (true) {
}

HTML/CSS Add Commands

add <expression>

Voice:

add margin right is five p x

Result:

margin-right: 5px;

add attribute <expression>

Before:

<input />

Voice:

add attribute type equals in quotes text

Result:

<input type="text" />

add empty tag <identifier>

Voice:

add empty tag b r

Result:

<br />

add ruleset <expression>

Voice:

add ruleset dot div

Result:

.div {
}

add tag <identifier>

Voice:

add tag div

Result:

<div></div>

Formatting Text

Symbols

  • (: paren, left paren, open paren
  • ): right paren, close paren
  • (): parens
  • [: bracket, left bracket, open bracket
  • ]: right bracket, close bracket
  • []: brackets
  • {: brace, left brace, open brace
  • }: right brace, close brace
  • {}: braces
  • <: less than, left angle bracket
  • >: greater than, right angle bracket
  • <>: angle brackets
  • =: equal
  • <=: less than or equal to
  • >=: greater than or equal to
  • ==: double equal
  • !=: not equal
  • &&: and
  • ||: or
  • ,: comma
  • :: colon
  • .: dot
  • _: underscore
  • ;: semicolon
  • !: bang, not
  • -: negative, minus
  • +: plus
  • *: star, times
  • /: slash, divided by
  • #: hash
  • ^: caret
  • ~: tilde
  • %: percent, mod
  • $: dollar
  • ': quote
  • ": double quote
  • """: triple quote
  • ?: question mark
  • &: ampersand
  • |: pipe
  • <<: left shift
  • >>: right shift
  • **: double star

Enclosures

  • (get): of get, in parens get
  • [get]: in brackets get
  • {get}: in braces get
  • 'get': in quotes get
  • "get": in double quotes get
  • """get""": in triple quotes get
  • _get_: in underscores get
  • __get__: in double underscores get
  • <get>: in comparators get, in angle brackets get

Text Style

  • Get value: capital get value
  • getValue: camel case get value
  • GetValue: pascal case get value
  • GET_VALUE: all caps get value
  • get_value: underscores get value